package com.ruin.tech.ahri.dao;

import com.ruin.tech.ahri.model.dto.Comment;
import com.ruin.tech.ahri.model.dto.CommentExample;
import com.ruin.tech.ahri.model.vo.CommentVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CommentMapper {
    int countByExample(CommentExample example);

    int deleteByExample(CommentExample example);

    int insert(Comment record);

    int insertSelective(Comment record);

    List<Comment> selectByExample(CommentExample example);

    int updateByExampleSelective(@Param("record") Comment record, @Param("example") CommentExample example);

    int updateByExample(@Param("record") Comment record, @Param("example") CommentExample example);

    List<CommentVO> selectCommentsByArticleId(@Param("articleId")Long articleId, @Param("showCommentNum")Integer showCommentNum);

    List<CommentVO> selectCommentsByUserId(@Param("userId")Long longUserId, @Param("showCommentNum")Integer showCommentNum);

    List<CommentVO> selectReplysByParentIds(@Param("ids")List<Long> ids);

}